import csv

csvFile = open("sampleSubmission_1.csv", "r")
reader = csv.reader(csvFile)  # 返回的是迭代类型
csvFile2 = open("sampleSubmission_2.csv", "w", newline='')
writer = csv.writer(csvFile2,dialect='excel')
data = []
for item in reader:
    if (len(item)):
        data.append(item)

print(data)
writer.writerows(data)
csvFile.close()
csvFile2.close()
